const cardDefaultData = [{ value: '0', name: '社保卡' }, { value: '1', name: '公积金卡' }];
const exeCuteType = [{ value: 'SOCIAL_SECURITY_ACTIVE', name: '社保卡，激活' }, { value: 'SOCIAL_SECURITY', name: '社保卡' }, { value: 'FUND', name: '公积金卡' }];
const exeCuteStatus = [{ value: '1', name: '可用' }, { value: '2', name: '不可用' }]
function getValueByKey(arr, key) {
    let re;
    arr.forEach(function (item) {
        if (item.value == key) {
            re = item.name;
        }
    })
    return re;
}
const getSearchInputConfig = (cityList) => {
    return [
        {
            type: 'select',
            placeholder: '请选择城市名称',
            name: 'cityCode',
            label: '城市名称',
            optionData: cityList,
            nameFiled: 'cityName',
            valueFiled: 'cityCode',
            selectProps: {
                allowClear: true,
            }
        },
        {
            type: 'input',
            placeholder: '请输入身份证号码',
            name: 'bodyCode',
            label: '身份证号码',
            optionData: cardDefaultData,
            selectProps: {
                allowClear: true,
            }
        },
        {
            type: 'select',
            placeholder: '请选择类型',
            name: 'boundCardType',
            label: '全部类型',
            optionData: exeCuteType,
            selectProps: {
                allowClear: true,
            }
        },
        {
            type: 'select',
            placeholder: '请选择状态',
            name: 'status',
            label: '全部状态',
            optionData: exeCuteStatus,
            selectProps: {
                allowClear: true,
            }
        }
    ]
};
const getTableConfig = (OptionNode) => {
    return [
        {
            title: 'ID',
            dataIndex: 'id',
            width: '6%'
        },
        {
            title: '用户ID',
            dataIndex: 'userId',
            width: '10%'
        },
        {
            title: '城市',
            dataIndex: 'cityName',
            width: '10%',
        },
        {
            title: '账号',
            dataIndex: 'account',
            width: '10%',
        },
        {
            title: '密码',
            dataIndex: 'password',
            width: '10%',
        },
        {
            title: '姓名',
            dataIndex: 'name',
            width: '8%',
        },
        {
            title: '手机号',
            dataIndex: 'mobile',
            width: '8%',
        },
        {
            title: '类型',
            dataIndex: 'gradType',
            width: '8%',
        },
        {
            title: '时间',
            dataIndex: 'createDate',
            width: '8%',
        },
        {
            title: '问题描述',
            dataIndex: 'errorMessage',
            width: '8%',
        },
        {
            title: '操作员',
            dataIndex: 'operator',
            width: '8%',
        },
        {
            title: '操作时间',
            dataIndex: 'operateTime',
            width: '8%',
        },
        {
            title: '状态',
            dataIndex: 'status',
            render: (text, record) => <OptionNode record={record}></OptionNode>,
            width: '10%',
        },
    ];
}
export default {
    getSearchInputConfig,
    getTableConfig
}